package week13.week_13_client;

import week13.week_13_server.Message;

import javax.net.ssl.SSLSocket;
import java.io.ObjectOutputStream;

public class Listener {
    String content="";

    public boolean isChange(String content){
        if (this.content.equals(content)||(content.equals(""))){
            return false;
        }
        this.content = content;
        return true;
    }

    public void sentToServer(SSLSocket socket,Message msg){
        try {
            ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream());
            oos.writeObject(msg);
        }catch (Exception ex){
            ex.printStackTrace();
        }
    }
}
